package com.sljy.hzk.net.service;

import com.google.gson.JsonObject;
import com.sljy.hzk.entity.ExamErrDetailEntity;
import com.sljy.hzk.entity.ExamHistotyEntity;
import com.sljy.hzk.entity.ExamInfosEntity;
import com.sljy.hzk.entity.ExamMainEntity;
import com.sljy.hzk.entity.ExamPriceEntity;
import com.sljy.hzk.entity.ExamSubmitEntity;
import com.sljy.hzk.entity.MainNoticeNumEntity;
import com.sljy.hzk.entity.UserEntity;
import com.sljy.hzk.net.CommonResult;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;

/**
 * Created  on 2018/7/4 0004
 *
 * @author 唐开阔
 * @describe
 */
public interface ExamService {
    /**
     * 我的任务首页
     * @param cpId
     * @param pId
     * @return
     */
    @FormUrlEncoded
    @POST("exam/list.do")
    Observable<CommonResult<ExamMainEntity>> getAllExam(@Field("cpId") long cpId, @Field("pId") long pId);

    @FormUrlEncoded
    @POST("exam/getHistoryScore.do")
    Observable<CommonResult<ExamHistotyEntity>> getAllExam(@Field("partitionId") long partitionId, @Field("userId") long userId, @Field("type") int type);

    /**
     * 综合评估
     * @param
     * @param
     * @return
     */
    @FormUrlEncoded
    @POST("exam/getTestData.do")
    Observable<CommonResult<ExamPriceEntity>> getPriceInfo(@Field("userId") long userId);

    /**
     * 获取任务详情
     * @param examId
     * @return
     */
    @FormUrlEncoded
    @POST("exam/questions.do")
    Observable<CommonResult<ExamInfosEntity>> getExamInfos(@Field("examId") String examId, @Field("name") String name,@Field("idCard") String idCard,@Field("userId") long userId );



    /**
     * jiaojuan
     * @param examId
     * @param cpId
     * @param paper
     * @return
     */
    @FormUrlEncoded
    @POST("exam/submit.do")
    Observable<CommonResult<ExamSubmitEntity>> submit(@Field("examId") String examId, @Field("cpId") long cpId, @Field("paper")String paper);

    @FormUrlEncoded
    @POST("exam/hisErrDetail.do")
    Observable<CommonResult<ExamErrDetailEntity>> getErrInfo(@Field("examId") int examId, @Field("cpId") long cpId);


    @FormUrlEncoded
    @POST("exam/sign.do")
    Observable<CommonResult<Object>> checkUser(@Field("examId") String examId, @Field("name") String name,@Field("idCard") String idCard,@Field("userId") long userId );
}
